Opened 13 years ago

Closed 9 years ago

Last modified 9 years ago

#1851 closed defect (fixed)

Wrong parameters for EPSG:3844 in spatial_ref_sys

Reported by: gix Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.1
Component: postgis Version: 2.0.x
Keywords: Cc:

Description

The transformation parameters between S42 and WGS84 datums wihch are listed inside the EPSG:3844 definition (TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84]) are valid for Poland, not for Romania. You can see this in the EPSG database: Coordinate Transformation with code 1645: Area of use = Poland - onshore.

The correct parameters for datum transformation in the case of EPSG:3844 are listed in the EPSG database with coordinate transformation code = 15995. These are: 2.329,-147.042,-92.08,0.309,-0.325,-0.497,5.69

Change History (5)

comment:1 by pramsey, 13 years ago

Resolution: fixed
Status: newclosed

Fixed at r9853, thanks.

comment:2 by rouault, 13 years ago

I've created http://trac.osgeo.org/geotiff/ticket/52 , since those kind of issues originate from libgeotiff, and then cascade to GDAL and PostGIS. At the next EPSG refresh, there's a risk of that change to be lost if not fixed in libgeotiff.

comment:3 by tudorbarascu, 9 years ago

Resolution: fixed
Status: closedreopened

Actually, r9853 introduced bigger errors because the coordinate transformation parameters given by the Romanian National Agency for Cadastre and Land Registration ( http://www.ancpi.ro ) are given for the Coordinate Frame Rotation method (https://epsg.io/9607-method) and as proj4 uses the https://epsg.io/9606-method (Position Vector transformation) the sign of the rotation parameters needs to change so that it works in proj4 as referenced at http://proj.maptools.org/gen_parms.html

This is clear from the EPSG database.

SELECT c.source_crs_code, c.target_crs_code, c.coord_op_name, c.coord_op_method_code, a.parameter_value,
 b.parameter_name, c.information_source, c.coord_tfm_version, c.remarks
 FROM epsg_coordoperationparamvalue a LEFT JOIN epsg_coordoperationparam b ON a.parameter_code = b.parameter_code
 LEFT JOIN epsg_coordoperation c ON a.coord_op_code = c.coord_op_code
 WHERE a.coord_op_code IN (15994, 15995);
  source_crs_code | target_crs_code |          coord_op_name          | coord_op_method_code | parameter_value |   parameter_name   |                           information_source                            | coord_tfm_version |                                                                                         remarks                                                                                          
-----------------+-----------------+---------------------------------+----------------------+-----------------+--------------------+-------------------------------------------------------------------------+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            4179 |            4326 | Pulkovo 1942(58) to WGS 84 (19) |                 9607 |          -92.08 | Z-axis translation | OGP                                                                     | OGP-Rom           | Parameter values taken from Pulkovo 1942(58) to ETRS89 (4) (code 15994) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.
            4179 |            4258 | Pulkovo 1942(58) to ETRS89 (4)  |                 9607 |        -92.0802 | Z-axis translation | National Agency for Cadastre and Land Registration; http://www.ancpi.ro | ANCPI-Rom 2008    | Replaces S-42 to ETRS89 (3) (tfm code 15993). Consistent with Transdat v3.0 to better than 0.5m. May be taken as approximate transformation Pulkovo 1942(58) to WGS 84 - see code 15995.
            4179 |            4326 | Pulkovo 1942(58) to WGS 84 (19) |                 9607 |           0.309 | X-axis rotation    | OGP                                                                     | OGP-Rom           | Parameter values taken from Pulkovo 1942(58) to ETRS89 (4) (code 15994) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.
            4179 |            4258 | Pulkovo 1942(58) to ETRS89 (4)  |                 9607 |       0.3092483 | X-axis rotation    | National Agency for Cadastre and Land Registration; http://www.ancpi.ro | ANCPI-Rom 2008    | Replaces S-42 to ETRS89 (3) (tfm code 15993). Consistent with Transdat v3.0 to better than 0.5m. May be taken as approximate transformation Pulkovo 1942(58) to WGS 84 - see code 15995.
            4179 |            4326 | Pulkovo 1942(58) to WGS 84 (19) |                 9607 |           2.329 | X-axis translation | OGP                                                                     | OGP-Rom           | Parameter values taken from Pulkovo 1942(58) to ETRS89 (4) (code 15994) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.
            4179 |            4258 | Pulkovo 1942(58) to ETRS89 (4)  |                 9607 |          2.3287 | X-axis translation | National Agency for Cadastre and Land Registration; http://www.ancpi.ro | ANCPI-Rom 2008    | Replaces S-42 to ETRS89 (3) (tfm code 15993). Consistent with Transdat v3.0 to better than 0.5m. May be taken as approximate transformation Pulkovo 1942(58) to WGS 84 - see code 15995.
            4179 |            4326 | Pulkovo 1942(58) to WGS 84 (19) |                 9607 |        -147.042 | Y-axis translation | OGP                                                                     | OGP-Rom           | Parameter values taken from Pulkovo 1942(58) to ETRS89 (4) (code 15994) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.
            4179 |            4258 | Pulkovo 1942(58) to ETRS89 (4)  |                 9607 |       -147.0425 | Y-axis translation | National Agency for Cadastre and Land Registration; http://www.ancpi.ro | ANCPI-Rom 2008    | Replaces S-42 to ETRS89 (3) (tfm code 15993). Consistent with Transdat v3.0 to better than 0.5m. May be taken as approximate transformation Pulkovo 1942(58) to WGS 84 - see code 15995.
            4179 |            4326 | Pulkovo 1942(58) to WGS 84 (19) |                 9607 |          -0.325 | Y-axis rotation    | OGP                                                                     | OGP-Rom           | Parameter values taken from Pulkovo 1942(58) to ETRS89 (4) (code 15994) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.
            4179 |            4258 | Pulkovo 1942(58) to ETRS89 (4)  |                 9607 |     -0.32482185 | Y-axis rotation    | National Agency for Cadastre and Land Registration; http://www.ancpi.ro | ANCPI-Rom 2008    | Replaces S-42 to ETRS89 (3) (tfm code 15993). Consistent with Transdat v3.0 to better than 0.5m. May be taken as approximate transformation Pulkovo 1942(58) to WGS 84 - see code 15995.
            4179 |            4326 | Pulkovo 1942(58) to WGS 84 (19) |                 9607 |          -0.497 | Z-axis rotation    | OGP                                                                     | OGP-Rom           | Parameter values taken from Pulkovo 1942(58) to ETRS89 (4) (code 15994) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.
            4179 |            4258 | Pulkovo 1942(58) to ETRS89 (4)  |                 9607 |     -0.49729934 | Z-axis rotation    | National Agency for Cadastre and Land Registration; http://www.ancpi.ro | ANCPI-Rom 2008    | Replaces S-42 to ETRS89 (3) (tfm code 15993). Consistent with Transdat v3.0 to better than 0.5m. May be taken as approximate transformation Pulkovo 1942(58) to WGS 84 - see code 15995.
            4179 |            4326 | Pulkovo 1942(58) to WGS 84 (19) |                 9607 |            5.69 |                    | OGP                                                                     | OGP-Rom           | Parameter values taken from Pulkovo 1942(58) to ETRS89 (4) (code 15994) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.
            4179 |            4258 | Pulkovo 1942(58) to ETRS89 (4)  |                 9607 |      5.68906266 |                    | National Agency for Cadastre and Land Registration; http://www.ancpi.ro | ANCPI-Rom 2008    | Replaces S-42 to ETRS89 (3) (tfm code 15993). Consistent with Transdat v3.0 to better than 0.5m. May be taken as approximate transformation Pulkovo 1942(58) to WGS 84 - see code 15995.
(14 rows)

So, the correct parameters should be:

{{{
+towgs84=2.329,-147.042,-92.08,0.309,0.325,0.497,5.69
or
+towgs84=2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266
}}}

and not as it's now in Postgis - with incorrect rotation parameters

+towgs84=2.329,-147.042,-92.08,0.309,-0.325,-0.497,5.69

As I am not at all familiar with SVN, can someone with commit rights can make the appropriate changes. If you think it would be better for me to do this I will study how to do it and make a.. pull request

Thanks a lot for your work!

Tudor

Last edited 9 years ago by tudorbarascu (previous) (diff)

comment:4 by pramsey, 9 years ago

Resolution: fixed
Status: reopenedclosed

Changes made directly to spatial_ref_sys in 2.0, 2.1, 2.2, svntrunk at r14827, r14828, r14829, r14830 respectively. Still need fixes in upstream libgeotiff scripts to correctly differentiate positional vector rotation from frame rotation when generating the spatial_ref_sys file from raw epsg database.

Note: See TracTickets for help on using tickets.